import sys
import random
import math

def f(d):
    d = math.ceil(d)
    if d<=3:
        fee=10
    elif d<=7:
        fee = 10+(d-3)*1.6
    else:
        fee = 10+4*1.6+(d-7)*2.4
    
    return fee

a=[1.5,2.9,3.0,3.3,4,5,6.5,7.0,7.5,8,15]
for i  in range(10):
    fin = open('{}.in'.format(i+1),'w')
    fout = open('{}.out'.format(i+1),'w')
    print(a[i],file=fin)
    print('{:.2f}'.format(f(a[i])),file=fout)
    fin.close()
    fout.close()

